<template>
  <div>
    <div class="paid">
      <el-image src="https://s1.ax1x.com/2022/05/26/XEZfm9.png"></el-image>
      <div class="paid_nav">
        <el-menu
          :default-active="activeIndex"
          class="el-menu-demo"
          mode="horizontal"
          active-text-color="#666666"
          :router="true"
        >
          <el-menu-item
            index="1"
            route="/paid/paidarticle"
          >文章</el-menu-item>
          <el-menu-item
            index="2"
            route="/paid/paidserialize"
          ><i class="iconfont icon-remen"></i> 连载</el-menu-item>
        </el-menu>
      </div>
      <div>
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "paid",
  data() {
    return {
      activeIndex: "1",
    };
  },
  mounted() {
    switch (this.$route.path) {
      case "/paid/paidarticle":
        this.activeIndex = "1";
        break;
      case "/paid/paidserialize":
        this.activeIndex = "2";
        break;

      default:
        break;
    }
  },
};
</script>

<style scoped>
.paid {
  width: 50%;
  margin: 0 auto;
  margin-top: 6.25rem;
}
.paid_nav {
  margin: 1.5rem 0px;
}
</style>